<template>
  <img src="./assets/logo.png" alt="" class="show-logo" v-if="!isIndex">
  <router-view/>
</template>
<script lang="ts" setup>
import axios from './utils/http'
import {watch,ref} from 'vue'
 import {useRouter} from "vue-router";
let router=useRouter()
let isIndex=ref(false)
watch(()=>router.currentRoute.value.path,(newVal)=>{
  isIndex.value=newVal==='/' || newVal==='/home'
},{immediate:true})
function getQuestionList(){
  axios.get('/api/dict/dict/questioncategory', {}).then((res:any)=>{
    sessionStorage.setItem('typeList',JSON.stringify(res.data.data))
  })
}
getQuestionList()

</script>
<style lang="scss">
html, body {
  overflow: hidden;
  user-select: none;
}
.show-logo{
  z-index: 10;
  position: absolute;
  left: -10px;
  width: 398px;
  top: -60px;
  height: 225px;
}
#app {
  width: 1920px;
  height: 1080px;
  overflow: hidden;
}
.wrap-wh{
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background: url('./assets/bg.png') no-repeat;
}
.center{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
</style>
